function genTrainingCmd2
global bForceUpdate
bForceUpdate = true;

Model_Scales = 2 : 4; % [2 4];
Model_Iters = 60; % [19 35]; % [3 19 35];

for scale = Model_Scales
    for iter = Model_Iters
        if scale == 4 && iter == 3
            continue
        end
        gen_training_cmd(scale, iter);
    end
end

function gen_training_cmd(scale, iter)
%%
cmd.caffe = '/home/wks/caffe/c1/caffe-master/build/tools/caffe';
cmd.solver_mode = 'gpu 0';

%% set train & test
Test.batch_size = 2;
Train.batch_size = 64;

DataSet = 'data291';
Aug.angles = 1 : 4;
Aug.scales = .6 : .1 : .9;
% Aug.flip_dims = [1 2];
Aug.flip_dims = [];

Patch.scale = scale;

Patch.xflow = sprintf('Bicubic->Bicubic->VDSR%.2d', iter);
Patch.yflow = 'VDSR';

Patch.ysize = 41;
Patch.overlap = 1;

Train.files = srdata.loadH5File(DataSet, Aug, Patch, Train.batch_size, cmd.solver_mode);
Test.files = srdata.loadH5File('Set5', [], Patch, Test.batch_size, cmd.solver_mode);
% srimg.h5imshow(Train.files);

%% set solver param
solv = VDSR.getSolv;
% solv.max_iter = 500; % 1000;
solv.display = 1000;
solv.snapshot = 2000;

%%
flowList = strsplit(Patch.xflow, '->');
ResultFolder = sprintf('%s-%s-Scale(%d)', flowList{end}, Patch.yflow, Patch.scale);

%% set net param
way = 'y';
net.kernel_size = 3;
net.weight_init_type = 'msra'; % 'gaussian(0.001)'
net.result_path = srpath.getResultPath(ResultFolder);
net = VDSR.getNet(way, net);

%%
mycaffe.genTrainingCmd(net, solv, cmd, Train, Test);
